package com.zhentao.controller;

import com.zhentao.domain.User;
import com.zhentao.service.UserService;
import com.zhentao.until.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Api(tags = "登入操作")
public class LoginController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public ResponseResult userLogin(@RequestBody User user){
        System.out.println(user+"-*------------------");
        return userService.userLogin(user);
    }

}
